package user;

import model.FIFOBuffer;
import model.Master;

/**
 * 
 * 
 * <p>
 * Klasse zum Testen des Funktionsumfangs
 */
public class userDemoMasterClient {

	/**
	 * @param args
	 */

	public static void main(String[] args) {
		
		//initial data
		FIFOBuffer <String> dataIN= new FIFOBuffer <String>();
		FIFOBuffer <String> dataOUT= new FIFOBuffer <String>();
		String s="";
		for (int i = 0; i < 2500; i++) {
			s=s+"a";	
			dataIN.send(s);
			
		}
		
		@SuppressWarnings("unchecked")
		long zstVorher;
		long zstNachher;

		zstVorher = System.currentTimeMillis();
		
		Master<String, String, String> M1=new Master<String, String, String>(new TaskMakesomthing(),dataIN);
		
		zstNachher = System.currentTimeMillis();
		System.out.println("Zeit benötigt: " + ((zstNachher - zstVorher)/1000) + " sec");

//		for (int i = 0; i < 2; i++) {
//			System.out.println("MasterResult= "+Master.outcomedata.recv());
//		
//		}

//		dataOUT=M1.getResult();
//		for (int i = 0; i < 2; i++) {
//			System.out.println("MasterResult= "+dataOUT.recv());	
//		
//		}

	}
}
